import java.lang.reflect.Array;
import java.util.Arrays;

public class test_4_15 {
    public static  void func(int[] arr){
        arr = new int[]{1, 2};
    }
    public static void main(String[] args) {
        int[] arr = {1, 2, 3, 4};
        func(arr);
        System.out.println(Arrays.toString(arr));
    }

    public static void main1(String[] args) {
        int[] arr1 = {1, 2, 3, 4};
        for(int i = 0; i < arr1.length; i++){
            System.out.print(arr1[i] + " ");
        }
        System.out.println();
        for (int i : arr1){
            System.out.print(i + " ");
        }
    }
}
